using System;
using System.Data;
using Auto.Web.Common;

namespace BaseSystem
{
    public partial class ChangeSkin : System.Web.UI.Page
    {
        protected void Page_PreInit(object sender, EventArgs e)
        {
            //if (Session["User"] == null )
            //{
            //    Response.Redirect("Login.aspx");
            //}
        }
        protected void Page_Load(object sender, EventArgs e)
        {

            //if (Session["skin"].ToString() == "Menu")
            //{
            //    Session["skin"] = "PanelBar";
            //}
            //else if (Session["skin"].ToString() == "PanelBar")
            //{
            //    Session["skin"] = "Menu";
            //}
            //if (Session["skin"].ToString() == "Menu")
            //{
            //    Response.Redirect("Index.aspx", true);
            //}
            //else if (Session["skin"].ToString() == "PanelBar")
            //{
            //    Response.Redirect("Main.aspx", true);
            //}

            //Change Session Of MenuStyle
            if (SessionBox.MenuStyle == "Menu")
            {
                SessionBox.MenuStyle = "PanelBar";
            }
            else if (SessionBox.MenuStyle == "PanelBar")
            {
               SessionBox.MenuStyle = "Menu";
            }


            //Redirect By MenuStyle
            if (SessionBox.MenuStyle == "Menu")
            {
                Response.Redirect("Index.aspx", true);
            }
            else if (SessionBox.MenuStyle == "PanelBar")
            {
                Response.Redirect("Main.aspx", true);
            }
        }
    }
}
